package com.ruijixiang.leetcode.everyday.leetcode2024.leetcode202410;

import java.util.Arrays;

public class leetcode20241016 {
    public double minimumAverage(int[] nums){
        Arrays.sort(nums);
        double ans=Double.MAX_VALUE;
        for(int i=0;i<nums.length/2;i++){
            ans=Math.min(ans,(double)(nums[i]+nums[nums.length-i-1])/2);
        }
        return ans;
    }
}
